#include "circle_buffer.h"

#include <stdio.h>

int main(void) {
	circle_buffer *cb = circle_buffer_create(20);
	circle_buffer_write(cb, "test", 4);
	circle_buffer_write(cb, "abcdrea", 7);
	circle_buffer_display(cb);
	char buffer[10] = {0};
	printf("r=%d\n", circle_buffer_read(cb, buffer, 9));
	printf("buffer = %s\n", buffer);
	circle_buffer_display(cb);
	circle_buffer_destory(cb);
	return 0;
}